

def handle_uploaded_file(file,path):
    print "upload begin!!!!!!!!!"

    try:
        destination = open(path, 'wb')
    
        print destination
        print "ok6!!!!!!!!!"
        for chunk in file.chunks():
            destination.write(chunk)
        destination.close()
    
    except Exception,e:
        print e
    
    print "upload ok!!!!!!!!!"
    
    
def capture_page(url,output):
    import os
    print 'iecapt --url=\"%s\" --out=\"%s\"'%(url,output)
    os.popen('iecapt --url=%s --out=\"%s\"'%(url,output))
    print 'ok!!!!!!'